home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / python2.4 / test / test_xpickle.pyo (.txt) < prev    next >
Python Compiled Bytecode  |  2005-10-18  |  2KB  |  40 lines

  1. # Source Generated with Decompyle++
  2. # File: in.pyo (Python 2.4)
  3.  
  4. import pickle
  5. import cPickle
  6. import unittest
  7. from test import test_support
  8. from test.pickletester import AbstractPickleTests
  9.  
  10. class DumpCPickle_LoadPickle(AbstractPickleTests):
  11.     error = KeyError
  12.     
  13.     def dumps(self, arg, proto = 0, fast = 0):
  14.         return cPickle.dumps(arg, proto)
  15.  
  16.     
  17.     def loads(self, buf):
  18.         return pickle.loads(buf)
  19.  
  20.  
  21.  
  22. class DumpPickle_LoadCPickle(AbstractPickleTests):
  23.     error = cPickle.BadPickleGet
  24.     
  25.     def dumps(self, arg, proto = 0, fast = 0):
  26.         return pickle.dumps(arg, proto)
  27.  
  28.     
  29.     def loads(self, buf):
  30.         return cPickle.loads(buf)
  31.  
  32.  
  33.  
  34. def test_main():
  35.     test_support.run_unittest(DumpCPickle_LoadPickle, DumpPickle_LoadCPickle)
  36.  
  37. if __name__ == '__main__':
  38.     test_main()
  39.  
  40.